home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / grphwiz.dxr / 00125_help button.ls < prev    next >
Encoding:
Text File  |  2000-01-14  |  1.2 KB  |  48 lines

  1. property ancestor, pMIAW
  2. global gEnvironObj, gGraphHelp, gIsRolloverTextOn
  3.  
  4. on new me, buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant
  5.   if objectp(descendant) then
  6.     ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant)
  7.   else
  8.     ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, me)
  9.   end if
  10.   cursor = [member("point hand", "graph.cst"), member("point hand mask", "graph.cst")]
  11.   set the cursor of sprite the pChannel of me to cursor
  12.   return me
  13. end
  14.  
  15. on setMIAW me, miaw
  16.   pMIAW = miaw
  17.   return me
  18. end
  19.  
  20. on performFunction me
  21.   tell the stage
  22.     playSFX(5)
  23.   end tell
  24.   if not windowPresent("Graph Help") then
  25.     whichPage = getPageNum(pMIAW)
  26.     tell the stage
  27.       openHelpWindow(whichPage)
  28.     end tell
  29.   else
  30.     showMe(gGraphHelp)
  31.   end if
  32.   return me
  33. end
  34.  
  35. on performRolloverFunction me
  36.   if gIsRolloverTextOn then
  37.     performRolloverFunction(ancestor)
  38.   end if
  39.   return me
  40. end
  41.  
  42. on performRolloffFunction me
  43.   if gIsRolloverTextOn then
  44.     performRolloffFunction(ancestor)
  45.   end if
  46.   return me
  47. end
  48.